Customizing Validation Messages |
|
In applications that require the user to input data, you can define validations on controls to ensure that correct data is provided. If appropriate data is not provided, validation fails, and an error message or notification message is displayed.
You can modify the textual content of these messages to customize them according to your application requirements. It is possible to customize these messages as explained below.
Customizing Form Level Messages
At the XForm level, an alert message displays when you try to close the XForm without saving the changes.
To customize the message, type the new textual content in the Form Messages pane of the Form - Properties window. For information about the Form - Properties window see Setting Properties of an XForm.
You can only specify form-level messages here.
Customizing Messages Related to Models
When you delete a record in an XForm, a message displays asking you to confirm the deletion of the record.
To customize the message, type the new textual content in the Model Messages tab of the Model Properties dialog box. For more information, see Model Properties dialog box.
You can only specify messages related to data models in the Model Properties dialog box.
Customizing Control Level Messages
It is possible to specify validation constraints to be applied to a control and the corresponding messages to be displayed for each constraint if its validation fails. You can use the onvalidate event to apply custom validations.
An error message or a notification message displays when the validation of a constraint fails.
To customize the message, type the new textual content for the corresponding constraint in the Messages tab of the Formatting Options dialog box. For information about the Formatting Options dialog box, see Formatting and Validating Controls.
You can specify these messages for all controls and for all data types.